package com.healthy.education.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.healthy.education.mapper.UserVideoViewsMapper;
import com.healthy.education.domain.UserVideoViews;
import com.healthy.education.service.IUserVideoViewsService;

/**
 * 视频观看记录Service业务层处理
 * 
 * @author 束伟
 * @date 2024-03-29
 */
@Service
public class UserVideoViewsServiceImpl implements IUserVideoViewsService 
{
    @Autowired
    private UserVideoViewsMapper userVideoViewsMapper;

    /**
     * 查询视频观看记录
     * 
     * @param id 视频观看记录主键
     * @return 视频观看记录
     */
    @Override
    public UserVideoViews selectUserVideoViewsById(Long id)
    {
        return userVideoViewsMapper.selectUserVideoViewsById(id);
    }

    /**
     * 查询视频观看记录列表
     * 
     * @param userVideoViews 视频观看记录
     * @return 视频观看记录
     */
    @Override
    public List<UserVideoViews> selectUserVideoViewsList(UserVideoViews userVideoViews)
    {
        return userVideoViewsMapper.selectUserVideoViewsList(userVideoViews);
    }

    /**
     * 新增视频观看记录
     * 
     * @param userVideoViews 视频观看记录
     * @return 结果
     */
    @Override
    public int insertUserVideoViews(UserVideoViews userVideoViews)
    {
        return userVideoViewsMapper.insertUserVideoViews(userVideoViews);
    }

    /**
     * 修改视频观看记录
     * 
     * @param userVideoViews 视频观看记录
     * @return 结果
     */
    @Override
    public int updateUserVideoViews(UserVideoViews userVideoViews)
    {
        return userVideoViewsMapper.updateUserVideoViews(userVideoViews);
    }

    /**
     * 批量删除视频观看记录
     * 
     * @param ids 需要删除的视频观看记录主键
     * @return 结果
     */
    @Override
    public int deleteUserVideoViewsByIds(Long[] ids)
    {
        return userVideoViewsMapper.deleteUserVideoViewsByIds(ids);
    }

    /**
     * 删除视频观看记录信息
     * 
     * @param id 视频观看记录主键
     * @return 结果
     */
    @Override
    public int deleteUserVideoViewsById(Long id)
    {
        return userVideoViewsMapper.deleteUserVideoViewsById(id);
    }
}
